package app.texas.com.devilfishhouse.View.login;


import app.texas.com.devilfishhouse.Base.BaseIView;
import app.texas.com.devilfishhouse.Base.BaseModel;
import app.texas.com.devilfishhouse.Base.BasePresenter;
import app.texas.com.devilfishhouse.Base.IModel;
import app.texas.com.devilfishhouse.Beans.LoginBean;

/**
 * Created by lenovo on 2018/5/21.
 */

public class LoginPersenter extends BasePresenter {

    public LoginPersenter(BaseIView iView) {
        super(iView);
    }

    @Override
    public void performOnClick() {

    }

    @Override
    public BaseModel getIModel() {
        return new LoginModel();
    }

    /**
     * 数据传递
     *
     * @param phone
     * @param pwd
     */
    public void setLoginParams(String phone, String pwd) {
        iModel.getData(phone, new IModel.ICallBack() {
            @Override
            public void onResult(Object data) {
                //登录
                LoginBean bean = (LoginBean) data;
//                bean.setMsg("哈哈哈登录成功");
                iView.setData(bean);
            }
        });

    }
}
